package com.spring.controller.filter;

import com.alibaba.fastjson2.JSONObject;
import com.spring.mqtt.MqttFilterInterface;
import com.spring.mqtt.MqttTopicUtils;
import com.spring.mqtt.annotation.MqttFilter;

@MqttFilter("AlarmSystem/MobileApp/${authorization}/HeartBeat/${type}")
public class MqttFilterProcessor implements MqttFilterInterface {
    @Override
    public boolean before(MqttTopicUtils var, JSONObject data) {
        System.out.println("过滤器前");
        return true;
    }

    @Override
    public boolean after(MqttTopicUtils var, JSONObject data) {
        System.out.println("过滤器后");
        return true;
    }
}
